package com.jn.erp.security.sysservice;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jn.erp.security.entity.SysRole;

import java.util.List;
import java.util.Set;

/**
 * <pre>
 *
 * </pre>
 *
 * @author sunjiyong
 * @since 2024/8/28 15:44
 */
public interface SysRoleService extends IService<SysRole> {

    List<SysRole> getRolesByUser(Long userId);

    List<SysRole> getRolesByOrgUser(Long userId,Long orgId);

    Set<String> selectRolePermissionByUserId(Long userId,Long orgId);

    List<SysRole> selectRoleList(SysRole sysRole);


    boolean checkRoleNameUnique(SysRole role);


    boolean checkRoleKeyUnique(SysRole role);

//    int insertRoleMenu(SysRole role);


    int deleteRoleByIds(Long[] roleIds);

    void checkRoleAllowed(SysRole role);

    int countUserRoleByRoleId(Long roleId);

    List<SysRole> selectRoleOrg(SysRole sysRole);
}
